---
slug: guide/cloud/functions/using-openapi
---

_Learn how to use your OpenAPI client to call your functions in Boundary Functions._

<Info>
  This page assumes you've already deployed your BAML code to Boundary Functions. If
  you haven't done that yet, check out the guide for [getting started](/guide/cloud/functions/get-started).
</Info>

<Info>
  This page assumes you're using an OpenAPI-generated BAML client. If you
  haven't done that yet, check out the [OpenAPI quickstart](/docs/get-started/quickstart/openapi).
</Info>

## Create an API key

You can create API keys in the [Boundary
Dashboard](https://dashboard.boundaryml.com/) by going to the left sidebar and
clicking on the key icon.

<div class="flex flex-col items-center">
  <img src="/assets/cloud/api-keys.png" alt="Boundary Functions API keys" />
</div>

Once you've created a new key, update your application code to use it as `BOUNDARY_API_KEY`.

## Update your application code

You also need to update your application code to use `BOUNDARY_ENDPOINT` and
`BOUNDARY_API_KEY`, if set, when constructing the OpenAPI client.

<Markdown src="../../snippets/openapi-howto-rely-on-envvars.mdx" />

## Set your environment variables

You can now set the following environment variables in your application:

```bash
BOUNDARY_API_KEY=...
BOUNDARY_ENDPOINT=https://api2.boundaryml.com/v3/functions/prod/
```

## Call your functions

You should now be able to call your deployed BAML functions using your OpenAPI client!